<%-- 
    Document   : showChatter
    Created on : Apr 14, 2011, 11:08:54 AM
    Author     : Revolutors Styx
--%>

<%@page language="java" import="chat.*" contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Room's Chatters</title>
    </head>
    <body>
        <%
        ChatRoomList roomList = (ChatRoomList)application.getAttribute("roomList");
        /*
        *get the room selected
        */
        int chatRoomNumber;
        /*get room number from user session*/
        chatRoomNumber = Integer.parseInt(request.getParameter("roomId"));
        ChatRoom room = roomList.getRoomOfId(chatRoomNumber);
        /*
        Load Room's Chatter
        */
        Chatter[] roomsChatters = room.getChattersArray();
        for (int a = 0; a < roomsChatters.length; a++){
            out.println(roomsChatters[a].getName() + "<br>");
        }
        %>
    </body>
</html>
